<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Prompt学习</title>
</head>
<body>
<h2>Prompt Test</h2>

<script type="text/javascript">
    function showPrompt(){
        var t1 = document.f1.t1;
        t1.value = prompt("Some prompt?");
    }
</script>
<form name="f1">
    <input type="button" name="b1" value="Click For Prompt" onclick="showPrompt()"><br><br>
    <input type="text" name="t1">
</form>
</body>
</html>